package com.briup.controller;

import com.briup.common.Result;
import com.briup.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * @author pgc
 * @Description:
 * @date 2023/11/12 15:57
 */
@RestController
@Api(tags = "模块")
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService mUserService;
    @ApiOperation("根据id查询信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "编号", required = true)
    })
    @GetMapping("{id}")
    private Result getBookById(@PathVariable Long id) {
        return Result.success(mUserService.getUserInfo(id));
    }
}
